Fix 'whitespace-mode' in CJK locales
authorEli Zaretskii <eliz@gnu.org>
Sat, 15 Mar 2025 11:42:12 +0000 (13:42 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 15 Mar 2025 11:42:12 +0000 (13:42 +0200)
* lisp/international/characters.el (ambiguous-width-chars): Remove
U+00A4 and U+00B7 from the list of ambiguous-width characters.
(cjk-ambiguous-chars-are-wide): Doc fix.  (Bug#76852)

lisp/international/characters.el

index 318957c15b9b97498cea1ba4c11b19997a554169..7be8bf32a93c7c0399ab5d213d3a868d91fa9db1 100644 (file)
@@ -1397,12 +1397,14 @@ with L, LRE, or LRO Unicode bidi character type.")
 
 ;; A: East Asian "Ambiguous" characters.
 (let ((l '((#x00A1 . #x00A1)
-          (#x00A4 . #x00A4)
+          ; (#x00A4 . #x00A4) whitespace-mode uses this
           (#x00A7 . #x00A8)
           (#x00AA . #x00AA)
           (#x00AD . #x00AE)
           (#x00B0 . #x00B4)
-          (#x00B6 . #x00BA)
+          ; (#x00B6 . #x00BA)  whitespace-mode uses U+00B7
+           (#x00B6 . #x00B6)
+           (#x00B8 . #x00BA)
           (#x00BC . #x00BF)
           (#x00C6 . #x00C6)
           (#x00D0 . #x00D0)
@@ -1620,6 +1622,10 @@ fonts being used.  In some CJK locales the fonts are set so that
 these characters are displayed as full-width.  This setting is most
 important for text-mode frames, because there Emacs cannot access the
 metrics of the fonts used by the console or the terminal emulator.
+You should configure the terminal emulator to behave consistently
+with the value of this option, by making sure it dispays ambiguous-width
+characters as half-width or full-width, depending on the value of this
+option.
 
 Do not set this directly via `setq'; instead, use `setopt' or the
 Customize commands.  Alternatively, call `update-cjk-ambiguous-char-widths'